<?php 
	if($_SERVER["REQUEST_METHOD"]=="POST") {
		$email		= strip_tags($_POST['email']);
		$password	= strip_tags($_POST['password']);
		$sql 		= "SELECT * FROM `tbl_member` WHERE `email` = '$email' AND `password` = '$password' AND `activate` = '1' LIMIT 1";
		$query = mysql_query($sql);
		while($result = mysql_fetch_assoc($query)) {
			$_SESSION['profile'] = $result;
			header("location: /");
			exit;
		}
		mysql_free_result($query);
	}
?>